package com.micklebes.service.impl;

import com.google.appengine.api.datastore.Key;
import com.micklebes.dao.IStorageDAO;
import com.micklebes.entity.Storage;
import com.micklebes.service.IStorageService;

import java.util.List;
import java.util.logging.Logger;

/**
 * User: th3sly
 * Date: 1/15/12
 * Time: 9:10 PM
 */
public class StorageService implements IStorageService {
    private IStorageDAO IStorageDAO;
    private static Logger logger = Logger.getLogger(StorageService.class.getName());

    public Storage createOrUpdate(Storage monsterEntity) {
        return IStorageDAO.createObject(monsterEntity);
    }

    public List<Storage> getAll() {
        return IStorageDAO.findAll();
    }

    public Storage getByKey(Key key) {
        return IStorageDAO.getByKey(key);
    }

    public void setIStorageDAO(IStorageDAO IStorageDAO) {
        this.IStorageDAO = IStorageDAO;
    }
}
